Integrand size = 29, antiderivative size = 141 \[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\frac {A b^3 (b \cos (c+d x))^{-3+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-3+n),\frac {1}{2} (-1+n),\cos ^2(c+d x)\right ) \sin (c+d x)}{d (3-n) \sqrt {\sin ^2(c+d x)}}+\frac {b^2 B (b \cos (c+d x))^{-2+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+n),\frac {n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2-n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {16, 2827, 2722} \[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\frac {A b^3 \sin (c+d x) (b \cos (c+d x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n-3}{2},\frac {n-1}{2},\cos ^2(c+d x)\right )}{d (3-n) \sqrt {\sin ^2(c+d x)}}+\frac {b^2 B \sin (c+d x) (b \cos (c+d x))^{n-2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n-2}{2},\frac {n}{2},\cos ^2(c+d x)\right )}{d (2-n) \sqrt {\sin ^2(c+d x)}} \]
[In]
[Out]
Rule 16
Rule 2722
Rule 2827
Rubi steps \begin{align*} \text {integral}& = b^4 \int (b \cos (c+d x))^{-4+n} (A+B \cos (c+d x)) \, dx \\ & = \left (A b^4\right ) \int (b \cos (c+d x))^{-4+n} \, dx+\left (b^3 B\right ) \int (b \cos (c+d x))^{-3+n} \, dx \\ & = \frac {A b^3 (b \cos (c+d x))^{-3+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-3+n),\frac {1}{2} (-1+n),\cos ^2(c+d x)\right ) \sin (c+d x)}{d (3-n) \sqrt {\sin ^2(c+d x)}}+\frac {b^2 B (b \cos (c+d x))^{-2+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+n),\frac {n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2-n) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 0.12 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.84 \[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=-\frac {(b \cos (c+d x))^n \csc (c+d x) \left (A (-2+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-3+n),\frac {1}{2} (-1+n),\cos ^2(c+d x)\right )+B (-3+n) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+n),\frac {n}{2},\cos ^2(c+d x)\right )\right ) \sec ^3(c+d x) \sqrt {\sin ^2(c+d x)}}{d (-3+n) (-2+n)} \]
[In]
[Out]
\[\int \left (\cos \left (d x +c \right ) b \right )^{n} \left (A +B \cos \left (d x +c \right )\right ) \left (\sec ^{4}\left (d x +c \right )\right )d x\]
[In]
[Out]
\[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\int { {\left (B \cos \left (d x + c\right ) + A\right )} \left (b \cos \left (d x + c\right )\right )^{n} \sec \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
Timed out. \[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\int { {\left (B \cos \left (d x + c\right ) + A\right )} \left (b \cos \left (d x + c\right )\right )^{n} \sec \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
\[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\int { {\left (B \cos \left (d x + c\right ) + A\right )} \left (b \cos \left (d x + c\right )\right )^{n} \sec \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
Timed out. \[ \int (b \cos (c+d x))^n (A+B \cos (c+d x)) \sec ^4(c+d x) \, dx=\int \frac {{\left (b\,\cos \left (c+d\,x\right )\right )}^n\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\cos \left (c+d\,x\right )}^4} \,d x \]
[In]
[Out]